import { get, post, postForm, put, del } from '@/config/http'
import { praseStrEmpty } from "@/config/ruoyi";


  /**
  *商家帮助
  */
 export const articleList = params => post('/article/list',params);


  /*字典 分类公共方法*/
  export const getCategoryDetailsNew = params => get('/system/category/getCategoryDetails?status=1',params);
  export const dictionariesDetailgetDictsNew = dictType => get('/system/dict/data/type/' + dictType,'');

  /*商品管理*/
  export const addGoods = params => post('/goodsInfo/addGoods',params);
  export const getGoodsList = params => post('/goodsInfo/getList',params);
  export const getGoodsDetails = params => postForm('/goodsInfo/getGoodsDetails',params);
  export const GoodsUpdate = params => post('/goodsInfo/updateGoods',params);
  export const GoodsUpdateStatus = params => postForm('/goodsInfo/updateStatus',params);

  /*商家管理*/
  export const getStoreDetails = params => post('/store/storeInfo/getStoreDetails',params);

  /*订单管理*/
  export const getOrderList = params => post('/order/getOrderList',params);
  export const getOrderStatusCount = params => post('/order/getOrderStatusCount',params);
  export const orderExport = params => post('/order/export',params);

  /*订单管理*/
  export const addModuleGoods = params => post('/goodsInfo/addModuleGoods',params);
  export const getActivityModuleList = params => post('/goodsInfo/getActivityModuleList',params);


  /*订单结算*/
  export const getOrderSettleList = params => post('/orderSettle/getOrderSettleList',params);
  export const getSettleStatusAmount = params => post('/orderSettle/getSettleStatusAmount',params);










  //订单导出
  export const scanOrderExport = params => post('/order/scanCode/scanOrderExport',params);

  /*商品组*/
  export const storeColumnlist = params => post('/store/storeColumn/list',params);
  export const storeColumnaddOrUpdate = params => post('/store/storeColumn/addOrUpdate',params);
  export const deleteStoreColumn = params => postForm('/store/storeColumn/deleteStoreColumn',params);
  export const addOperateGroup = params => postForm('/goods/hotGoodsInfo/addOperateGroup',params);
  export const getOperationGroupList = params => postForm('/goods/hotGoodsInfo/getOperationGroupList',params);

  /*用户管理 积分明细*/
  export const pointsAdd = params => post('/points/add',params);
  export const pointsAudit  = params => post('/points/audit ',params);
  export const pointsDetail = params => postForm('/points/detail/{id}',params);
  export const pointsGetUserOrderQueryRes  = params => post('/points/getUserOrderQueryRes',params);
  export const pointsList = params => post('/points/list',params);
  export const orderPointsExport = params => post('/points/orderPointsExport',params);
  export const orderPointsList  = params => post('/points/orderPointsList ',params);
  export const orderPointsQuery  = params => post('/points/orderPointsQuery',params);
  export const pointsUser0rderItemExport = params => post('/points/userOrderItemExport',params);
  export const pointsUserOrderItemList  = params => post('/points/userOrderItemList ',params);

 // 退出方法
 export const getCallRecord = params => get('sale/open/getCallRecord',params);
 // 商品发布
 export const getGoodsDetail = params => postForm('/goods/goodsInfo/getGoodsDetail',params);
 export const goodsListInfo = params => post('/goods/goodsInfo/getColumnGoodsList',params);
 export const getCategoryGoodsList = params => post('/goods/hotGoodsInfo/getCategoryGoodsList ',params);
 export const releaseGoods = params => post('/goods/goodsInfo/releaseGoods',params);
 export const setGoodsTag = params => postForm('/goods/goodsInfo/setGoodsTag',params);
 export const deleteGoods = params => postForm('/goods/goodsInfo/deleteGoods',params);
 export const updateGoodsStatus = params => postForm('/goods/goodsInfo/updateGoodsStatus',params);
 export const applyHotGoods = params => post('/goods/hotGoodsInfo/applyHotGoods',params);
 export const updateHotGoods = params => post('/goods/hotGoodsInfo/updateHotGoods',params);
 export const getStoreMarkupRate = params => post('/goods/goodsInfo/getStoreMarkupRate',params);
 export const updateGoodsInfo = params => post('/goods/goodsInfo/updateGoodsInfo',params);
 export const goodsSortUp = params => postForm('/goods/goodsInfo/sortUp',params);
 export const goodsUpTop = params => postForm('/goods/goodsInfo/upTop',params);

 // 任务提醒
 export const remindList = params => post('/store/taskNotification/getTaskList',params);
 export const getNoticeCount = params => post('/store/taskNotification/getNoticeCount',params);

 // 订单销售报表
 export const orderSalesGetList = params => post('/statement/orderSales/getList',params);
 export const getOrderSalesQuery = params => post('/statement/orderSales/getOrderSalesQuery',params);

 // 总收益统计报表
 export const getTotalRevenueList = params => post('/statement/totalRevenue/getList',params);
 export const getTotalRevenueQuery = params => post('/statement/totalRevenue/getTotalRevenueQuery',params);
 export const totalRevenueExport = params => post('/statement/totalRevenue/totalRevenueExport',params);

 // 商品销售报表
 export const goodsSalesGetList = params => post('/statement/goodsSales/getList',params);
 export const getGoodsSalesQuery = params => post('/statement/goodsSales/getGoodsSalesQuery',params);

 // 商品分类
 export const goodsCategoryList = params => postForm('/goods/category/getCategoryList',params);
 export const goodsUpdateCategory = params => post('/goods/category/updateCategory',params);
 export const goodsCategoryAdd = params => post('/goods/category/add',params);
 export const goodsCategoryDelete = params => postForm('/goods/category/delete',params);
 export const goodsCategoryUpdateStatus = params => postForm('/goods/category/updateStatus',params);

 // 商品库存
 export const getGoodsStock = params => postForm('/goods/goodsStock/getGoodsStock',params);
 export const goodsStockList = params => post('/goods/goodsStock/list',params);
 export const updateStock = params => post('/goods/goodsStock/updateStock',params);

 // 扫码订单
 export const scanCodeGetOrderQuantity = params => post('/order/scanCode/getOrderQuantity',params);
 export const scanCodeList = params => post('/order/scanCode/list',params);
 export const getOrderEvaluation = params => postForm('/order/scanCode/getOrderEvaluation',params);

 // 商品订单
 export const getOrderDetail = params => postForm('/order/goodsOrder/getOrderDetail',params);
 export const rejectAfterSales = params => postForm('/order/goodsOrder/rejectAfterSales',params);
 export const getOrderQuantitys = params => post('/order/goodsOrder/getOrderQuantity',params);
 export const getReceiveAddress = params => postForm('/order/goodsOrder/getReceiveAddress',params);
 export const settingLogistics = params => post('/order/goodsOrder/settingLogistics',params);
 export const updateLogistics = params => post('/order/goodsOrder/updateLogistics',params);
 export const updateAddress = params => post('/order/goodsOrder/updateAddress',params);
 export const goodsOrderList = params => post('/order/goodsOrder/list',params);
 export const getExpressList = params => post('/order/goodsOrder/getExpressList',params);
 export const updateAfterSalesInfo = params => postForm('/order/goodsOrder/updateAfterSalesInfo',params);

 export const agreeRefund = params => postForm('/order/goodsOrder/agreeRefund',params);
 export const confirmReturnGoodsRefund = params => postForm('/order/goodsOrder/confirmReturnGoodsRefund',params);


 // 门店信息
 export const getStoreInfo = params => post('/store/storeInfo/getStoreInfo',params);
 export const updateStore = params => post('/store/storeInfo/updateStore',params);

 // 门店公告
 export const addOrUpdate = params => post('/store/announcement/addOrUpdate',params);
 export const getAnnouncement = params => post('/store/announcement/getAnnouncement',params);

 // 好店推广位
 export const storePromotionDelete = params => postForm('/store/storePromotion/delete',params);
 export const storePromotionList = params => post('/store/storePromotion/list',params);
 export const storePromotionRead = params => post('/store/storePromotion/read',params);
 export const storePromotionCompare = params => post('/store/storePromotion/compare',params);
 export const storePromotionAdd = params => post('/store/storePromotion/add',params);

 // 素材库
 export const materialAdd = params => post('/store/material/add',params);
 export const materialList = params => post('/store/material/list',params);
 export const materialDelete = params => postForm('/store/material/delete',params);


 // 订单结算
 export const orderSettlementList = params => post('/goods/orderSettlement/list',params);
 export const getRefundQuantity = params => post('/goods/orderSettlement/getRefundQuantity',params);

 // 订单退款
 export const orderSettlementRefundlist = params => post('/goods/orderSettlement/refundlist',params);
  export const getSettleQuantity = params => post('/goods​/orderSettlement​/getSettleQuantity',params);
  export const orderAfterSaleGetList = params => post('/order/orderAfterSale/getList',params);

export const orderRefundGetList = params => post('/order/orderRefund/getList',params);
export const getRefundTotalAmount = params => post('/order/orderRefund/getRefundTotalAmount',params);
export const getSummaryAmount = params => post('/goods/orderSettlement/getSummaryAmount',params);
 /**
  *获取意向客户等级
  */
 export const getIclevel = params => get('sale/open/getIclevel',params);

 /**
  *地区设置
  */
 export const goodsQuerylist = params => post('/goodsQuery/list',params);
 //export const getGoodsDetail = params => postForm('/goodsQuery/getGoodsDetail',params);

 /**
  *好礼好店订单
  */
 export const orderGetAfterSaleInfo = params => postForm('/order/getAfterSaleInfo',params);
 export const getOrderQuantity = params => postForm('/order/getOrderQuantity',params);
 export const orderList = params => post('/order/list',params);
 export const orderRead = params => postForm('/order/read',params);


 /**
  *登录
  */
 export const login = params => post('/login',params);
 export const logout = params => get('/logout',params);
 export const getCodeImg = params => get('/captchaImage',params);
 export const getRouters = params => get('/getRouters',params);
 export const getConfigKey = configKey => get('/system/config/configKey/' + configKey,'');

 /**
  *标签管理
  */
 export const addTag = params => postForm('/system/tag/addTag',params);
 export const getTagCategory = params => postForm('/system/tag/getAllTagType',params);
 export const getTagList = params => post('/system/tag/list',params);

 /**
  *参数设置
  */
 export const getSystemParam = params => post('/system/paramSetting/getSystemParam',params);
 export const setSystemParam = params => post('/system/paramSetting/setSystemParam',params);

 /**
  *登录日志
  */
 export const loadinLoglist = params => post('/monitor/logininfor/list',params);
 export const delLogininfor = params => del('/monitor/logininfor/'+params,'');
 export const cleanLogininfor = params => del('/monitor/logininfor/clean',params);
 export const exportLogininfor = params => get('/monitor/logininfor/export',params);

 /**
  *操作日志
  */
 export const operloglist = params => post('/monitor/operlog/list',params);
 export const delOperlog = params => del('/monitor/operlog/'+params,'');
 export const cleanOperlog = params => del('/monitor/operlog/clean',params);
 export const exportOperlog = params => get('/monitor/operlog/export',params);
 /**
  *地区设置
  */
 export const getRegionList = params => get('/system/area/getList',params);
 export const setRegion = params => postForm('/system/area/setRegion',params);

 /**
  *分类管理
  */
 export const getCategoryList = params => get('/system/category/categoryList',params);
 export const getCategoryDetails = params => get('/system/category/getCategoryDetails',params);

 /**
  *字典管理
  */
 export const dictionarieslistType = params => get('/system/dict/type/list',params);
 export const dictionariesgetType = dictId => get('/system/dict/type/' + dictId,'');
 export const dictionariesaddType = params => post('/system/dict/type',params);
 export const dictionariesupdateType = params => put('/system/dict/type',params);
 export const dictionariesdelType = params => del('/system/dict/type/' + dictId,params);
 export const dictionariesoptionselect = params => get('/system/dict/type/optionselect',params);

 /**
  *字典详情
  */
 export const dictionariesDetaillistData = params => get('/system/dict/data/list',params);
 export const dictionariesDetailgetData = dictCode => get('/system/dict/data/' + dictCode,'');
 export const dictionariesDetailgetDicts = dictType => get('/system/dict/data/type/' + dictType,'');
 export const dictionariesDetailaddData = params => post('/system/dict/data',params);
 export const dictionariesDetailupdateData = params => put('/system/dict/data',params);
 export const dictionariesDetaildelData = dictCode => del('/system/dict/data/' + dictCode,'');
 export const dictionariesDetailexportData = params => get('/system/dict/data/export',params);


/*架构设置*/
 export const listDept = params => get('/system/dept/list',params);
 export const listDeptExcludeChild = params => get('/system/dept/list/exclude/'+params.id,'');
 export const getDept = params => get('/system/dept/'+params.id,'');
 export const treeselect = params => get('/system/dept/treeselect',params);
 export const roleDeptTreeselect = params => get('/system/dept/roleDeptTreeselect/'+params,'');
 export const addDept = params => post('/system/dept',params);
 export const updateDept = params => put('/system/dept',params);
 export const delDept = params => del('/system/dept/'+params,'');

 /*菜单管理*/
  export const listMenu = params => get('/system/menu/list',params);
  export const getMenu = params => get('/system/menu/'+params,'');
  export const menuTreeselect = params => get('/system/menu/treeselect',params);
  export const roleMenuTreeselect = params => get('/system/menu/roleMenuTreeselect/'+params,'');
  export const addMenu = params => post('/system/menu',params);
  export const updateMenu = params => put('/system/menu',params);
  export const delMenu = params => del('/system/menu/'+params,'');

  /*角色管理*/
  export const listRole = params => get('/system/role/list',params);
  export const getRole = roleId => get('/system/role/' + roleId,'');
  export const addRole = params => post('/system/role',params);
  export const updateRole = params => put('/system/role',params);
  export const dataScope = params => put('/system/role/dataScope',params);
  export const changeRoleStatus = params => put('/system/role/changeStatus',params);
  export const delRole = roleId => del('/system/role/' + roleId,'');
  export const exportRole = params => get('/system/role/export',params);
  export const allocatedUserList = params => get('/system/role/authUser/allocatedList',params);
  export const unallocatedUserList = params => get('/system/role/authUser/unallocatedList',params);
  export const authUserCancel = params => put('/system/role/authUser/cancel',params);
  export const authUserCancelAll = params => put('/system/role/authUser/cancelAll',params);
  export const authUserSelectAll = params => put('/system/role/authUser/selectAll',params);

  /*用户管理*/
  export const listUser = params => get('/system/user/list',params);
  export const getUser = userId => get('/system/user/' + praseStrEmpty(userId),'');
  export const addUser = params => post('/system/user',params);
  export const updateUser = params => put('/system/user',params);
  export const delUser = userId => del('/system/user/' + userId,'');
  export const exportUser = params => get('/system/user/export',params);
  export const resetUserPwd = params => put('/system/user/resetPwd',params);
  export const changeUserStatus = params => put('/system/user/changeStatus',params);
  export const getUserProfile = params => get('/system/user/profile',params);
  export const updateUserProfile = params => put('/system/user/profile',params);
  export const updateUserPwd = params => put('/system/user/profile/updatePwd',put);
  //export const uploadAvatar = params => post('/system/user/profile/avatar',params);
  export const uploadAvatar = params => post('/system/file/upload',params);
  export const importTemplate = params => get('/system/user/importTemplate',params);
  export const getAuthRole = params => get('/system/user/authRole/'+params,'');
  export const updateAuthRole = params => put('/system/user/authRole',params);
